<template>
  <div>
    <el-card>
			<el-form :model="state.dataForm"  ref="dataFormRef">
        <div v-for="(item, index) in state.test" :item="item" :index="index" :key="index + 1">
          <v-form-render :form-json="item" :form-data="{}" :option-data="{}" ref="VFormRef"> </v-form-render>
        </div>
			</el-form>
			<footer class="el-dialog__footer" style="text-align:center">
				<span class="dialog-footer">
					<el-button>取消</el-button>
					<el-button type="primary">确定</el-button>
				</span>
			</footer>
		</el-card>
  </div>
</template>

<script setup lang="ts" name='vformpreview'>
import { ref, reactive, onMounted, defineProps } from 'vue';
const props = defineProps<{ previewList: Array<[]> }>();
const dataFormRef = ref()
const VFormRef = ref()
const state = reactive({
  formData: {},
  formJson: {},
  optionData: {},
  test: props.previewList,
})

onMounted(() => {
  console.log(state.test,'test');
})
</script>

<style scoped>

</style>